﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login.aspx.cs" Inherits="AcadPosApp.login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Login</title>
    <link href='<%#ResolveUrl("App_Themes/css/bootstrap-theme.css")%>' rel="stylesheet"
        type="text/css" />
    <link type="text/css" href='<%#ResolveUrl("App_Themes/css/bootstrap.css")%>' rel="stylesheet" />
    <link type="text/css" href='<%#ResolveUrl("App_Themes/css/menu-bar.css")%>' rel="stylesheet" />
    <link type="text/css" href='<%#ResolveUrl("App_Themes/css/menu-bar.css")%>' rel="stylesheet" />
    <link href='<%#ResolveUrl("App_Themes/css/jquery.jgrowl.css")%>' rel="stylesheet"
        type="text/css" />
    <script type="text/javascript" src="http://code.jquery.com/jquery.js"></script>
    <!--Fim Estilos-->
    <!--Scripts-->
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <script type="text/javascript" src='<%#ResolveUrl("App_Themes/js/bootbox.min.js")%>'></script>
    <script type="text/javascript" src='<%#ResolveUrl("App_Themes/js/bootstrap.js")%>'></script>
    <script type="text/javascript" src='<%#ResolveUrl("App_Themes/js/docs.min.js")%>'></script>
    <script type="text/javascript" src='<%#ResolveUrl("App_Themes/js/classie.js")%>'></script>
    <script type="text/javascript" src='<%#ResolveUrl("App_Themes/js/jquery.jgrowl.js")%>'></script>
    <script src='<%#ResolveUrl("App_Themes/js/twitter-bootstrap-hover-dropdown.js")%>'
        type="text/javascript"></script>
    <script src='<%#ResolveUrl("App_Themes/js/twitter-bootstrap-hover-dropdown.min.js")%>'
        type="text/javascript"></script>
    <link href="App_Themes/css/bootstrap-theme.css" rel="stylesheet" type="text/css" />
    <link href="App_Themes/css/site.css" rel="stylesheet" type="text/css" />
    <link href="App_Themes/css/bootstrap-theme.min.css" rel="stylesheet" type="text/css" />
    <link href="App_Themes/css/bootstrap.css" rel="stylesheet" type="text/css" />
    <link href="App_Themes/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="App_Themes/css/login.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <script type="text/javascript" src="App_Themes/js/bootbox.min.js"></script>
    <script type="text/javascript" src="App_Themes/js/bootstrap.js"></script>
    <style type="text/css">
        .style1
        {
            font-size: x-small;
        }
    </style>
</head>
<body>
    <div class="row-fluid">
        <div class="col-md-4">
            
        </div>
        <div class="col-md-4">
            <div class="container effect6">
                <form id="form2" class="form-signin"  runat="server">
                <div align="center">
                    <h3 class="form-signin-heading">
                        Login <span class="style1">15.167</span></h3>
                    <asp:Login ID="LoginAcadPos" runat="server" BorderColor="Black" 
                        CssClass="modal-form" DestinationPageUrl="Default.aspx"
                        FailureText="Usuário e/ou senha incorreto(s)." LoginButtonText="Acessar" PasswordLabelText="Senha:"
                        PasswordRequiredErrorMessage="Campo Senha é obrigatório!" RememberMeText="Lembre-me da próxima vez."
                        TitleText="Login" UserNameLabelText="Usuário:" 
                        UserNameRequiredErrorMessage="Campo Usuário é obrigatório!" 
                        onloggedin="LoginAcadPos_LoggedIn">
                        <LayoutTemplate>
                            <table cellpadding="1" cellspacing="0" style="border-collapse: collapse;">
                                <tr>
                                    <td>
                                        <table cellpadding="0">
                                            <tr>
                                                <td align="center">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <br />
                                                    <asp:TextBox ID="UserName" required placeholder="Usuário" runat="server"></asp:TextBox>
                                                    <br />
                                                    <asp:TextBox ID="Password" runat="server" CssClass="form-control" placeholder="Senha" required="" 
                                                        TextMode="Password"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    &nbsp;</td>
                                            </tr>
                                            <tr>
                                                <td align="center">
                                                    
                                                    <asp:LinkButton ID="LblRecuperarSenha" runat="server" Font-Bold="True" OnClick="LblRecuperarSenha_Click">Esqueceu sua senha?</asp:LinkButton>
                                                    <br />
                                                    <br />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center" style="color: Red;">
                                                    <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    <asp:Button ID="LoginButton" runat="server" CommandName="Login" CssClass="btn btn-lg btn-primary btn-block"
                                                        Text="Acessar" ValidationGroup="Login1" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </LayoutTemplate>
                    </asp:Login>
                </div>
                <br />
                <div align="center">
                    <img width="100px" opacity: 0.4;" src="App_Themes/img/logo2.png" />
                </div>
                </form>
            </div>
        </div>
        <div class="col-md-4">
            
        </div>
    </div>
 
    <!-- /container -->
    <div class="navbar navbar-fixed-bottom " align="center">
        <div class="navbar-inner">
            <div align="center" class="rodape">
                <br />
                <p>
                    Trust Softwares ® 2015 </p>
            </div>
        </div>
    </div>
</body>
</html>
<script type="text/javascript">
    $("select").addClass("form-control");
    $("input[type=text]").addClass("form-control");
    $("input[type=submit]").addClass("btn btn-success");
    </script>
    <script type="text/javascript">
        var prm = Sys.WebForms.PageRequestManager.getInstance();
        prm.add_beginRequest(BeginRequestHandler);
        prm.add_endRequest(EndRequestHandler);


        function BeginRequestHandler(sender, args) {
            $("select").addClass("form-control");
            $("input[type=text]").addClass("form-control");
            $("input[type=submit]").addClass("btn btn-success");

        }

        function EndRequestHandler(sender, args) {
            $("select").addClass("form-control");
            $("input[type=text]").addClass("form-control");
            $("input[type=submit]").addClass("btn btn-success");

        }    
    </script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#subir').click(function () {
                $('html, body').animate({ scrollTop: 0 }, 'slow');
                return false;
            });
        });
    </script>
    <script>
        function formatar_mascara(src, mascara) {
            var campo = src.value.length;
            var saida = mascara.substring(0, 1);
            var texto = mascara.substring(campo);
            if (texto.substring(0, 1) != saida) {
                src.value += texto.substring(0, 1);
            }
        }

        function currencyFormat(fld, milSep, decSep, e) {
            if (fld.value.length < 10) {
                var sep = 0;
                var key = '';
                var i = j = 0;
                var len = len2 = 0;
                var strCheck = '0123456789';
                var aux = aux2 = '';
                var whichCode = (window.Event) ? e.which : e.keyCode;
                if (whichCode == 13) return true;  // Enter
                key = String.fromCharCode(whichCode);  // Get key value from key code
                if (strCheck.indexOf(key) == -1) return false;  // Not a valid key
                len = fld.value.length;
                for (i = 0; i < len; i++)
                    if ((fld.value.charAt(i) != '0') && (fld.value.charAt(i) != decSep)) break;
                aux = '';
                for (; i < len; i++)
                    if (strCheck.indexOf(fld.value.charAt(i)) != -1) aux += fld.value.charAt(i);
                aux += key;
                len = aux.length;
                if (len == 0) fld.value = '';
                if (len == 1) fld.value = '0' + decSep + '0' + aux;
                if (len == 2) fld.value = '0' + decSep + aux;
                if (len > 2) {
                    aux2 = '';
                    for (j = 0, i = len - 3; i >= 0; i--) {
                        if (j == 3) {
                            aux2 += milSep;
                            j = 0;
                        }
                        aux2 += aux.charAt(i);
                        j++;
                    }
                    fld.value = '';
                    len2 = aux2.length;
                    for (i = len2 - 1; i >= 0; i--)
                        fld.value += aux2.charAt(i);
                    fld.value += decSep + aux.substr(len - 2, len);
                }
                return false;
            }
        }    
    </script>
    <script type="text/javascript">

        function replaceAll(find, replace, str) {
            while (str.indexOf(find) > -1) {
                str = str.replace(find, replace);
            }
            return str;
        }

        window.alert = function (msg) {
            var texto = msg;
            var msgFinal = replaceAll('-', '<br>• ', msg);
            $.jGrowl
            (
            msgFinal,
             {
                 life: 5000
             },
             {
                 header: 'Corrija os campos:'
             });
        };
    
    </script>
    <script>
        <!--Inicializando o hack para o menu dropdown no Bootstrap 3.0-->
    $(document).ready(function () {
        $('.js-activated').dropdownHover().dropdown();
    });
    </script>
    <script>
        <!--Inicializando o datepicker-->
    $(document).ready(function () {
        $('[data-toggle=offcanvas]').click(function () {
            $('.row-offcanvas').toggleClass('active');
        });
    });

    </script>
    <script type="text/javascript">

        function mascara(o, f) {
            v_obj = o
            v_fun = f
            setTimeout("execmascara()", 1)
        }
        function execmascara() {
            v_obj.value = v_fun(v_obj.value)
        }
        function mvalor(v) {
            v = v.replace(/\D/g, ""); //Remove tudo o que não é dígito  
            v = v.replace(/(\d)(\d{8})$/, "$1.$2"); //coloca o ponto dos milhões  
            v = v.replace(/(\d)(\d{5})$/, "$1.$2"); //coloca o ponto dos milhares  

            v = v.replace(/(\d)(\d{2})$/, "$1,$2"); //coloca a virgula antes dos 2 últimos dígitos  
            return v;
        }
    
    </script>

